package com.godyao.common;

import com.godyao.framework.beans.PropertyValue;
import com.godyao.framework.beans.PropertyValues;
import com.godyao.framework.beans.factory.ConfigurableListableBeanFactory;
import com.godyao.framework.beans.factory.config.BeanDefinition;
import com.godyao.framework.beans.factory.config.BeanFactoryPostProcessor;

public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
        BeanDefinition userServiceBd = beanFactory.getBeanDefinition("userService");
        PropertyValues propertyValues = userServiceBd.getPropertyValues();

        propertyValues.addPropertyValue(new PropertyValue("company", "改成字节跳动"));
    }
}
